import torch
#==============全局参数===============
cuda = False and torch.cuda.is_available()
#==================参数===============
video_path = "/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标跟踪/yolov4_deepsort_pytorch(副本)/393540309-1-208.mp4"
config_detection = "./configs/yolov4.yaml"
config_deepsort = "./configs/deep_sort.yaml"
display = True
frame_interval = 1
display_width,display_height=800,600
save_path = "/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标跟踪/yolov4_deepsort_pytorch(副本)"
#===================deep_sort的track参数=========
reid_ckpt = "/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标跟踪/yolov4_deepsort_pytorch(副本)/ckpt.t7"    #特征提取器的权重
min_confidence = 0.5    #只有检测结果的置信度大于这个值才会被跟踪
nms_max_overlap = 0.4
max_iou_distance = 0.7
max_age = 70            #在一个track被删除之前，未命中的最大值
#确认轨迹前的连续检测次数。如果在前"n_init"帧内发生未命中，则跟踪状态置为"Deleted"
n_init = 3              #在初始阶段，track维持在初始阶段的数量
matching_threshold = 0.2#cost大于此值的关联将被忽略，马氏距离>马氏门控阈值的，将被置为此值。
nn_budget = 100
metric = "cosine"
#===============yolov4的参数=====================
num_classes = 12
yolov4_cfg = "yolov4.cfg"
yolov4_weight = "/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标跟踪/yolov4_deepsort_pytorch(副本)/yolov4.weights"
anchors_mask = [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
backbone="preffinet_B0"                     #mobilenetv1,mobilenetv2,mobilenetv3,ghostnet,densenet121,densenet169,densenet201,geffinetv2_b0
pr_yolo_pth = "/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/权重/PR-YOLOV4/BDD10K/B0Adavpteve/Epoch161_lr3.76e-06_traLoss736.23_valLoss1784.54.pth"
input_img_size=[608,608]            # 输入的shape大小，一定要是32的倍数，320,416,[h,w]
yolo_anchors = [[5,10], [6,18], [10,11], [11,40], [13,20], [22,29], [33,51], [64,84], [135,191]]    #anchors,这个anchors使用k均值聚类生成,代表先验框的宽高
anchors = [[13, 18], [32, 42], [60, 73], [71, 162], [113, 200],
                        [168, 93], [176, 296], [258, 210], [310,345]]  # anchors,这个anchors使用k均值聚类生成,代表先验框
num_anchors,anchor_step = 9,2
letterbox_image = False #是否进行不失真的resize
#voc_annotation.py参数
layout_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/目标检测数据集/dataset_all/Layout"
where_to_save_txt_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标识别/mobilenet-yolov4-pytorch(副本)/split_dataSets"

#get_map.py参数
test_txt_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/我的数据集/目标检测数据集/dataset_all/Layout/test.txt"
all_annotation_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/目标检测数据集/dataset_all/Annotations"
all_image_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/目标检测数据集/dataset_all/JPEGImages"
map_out_path="map_out"

#yolo.py参数,主要用来测试demo和计算map用
test_model_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/权重/PR-YOLOV4/BDD10K/B0Adavpteve/Epoch41_lr0.00028243_traLoss810.27_valLoss1989.98.pth"

#================================================训练阶段train.py参数================================================
train_batch_size,val_batch_size = 16,32
continue_train,use_pretrain,use_pre_backbone = False,False,False           #是否继续训练，是否加载预训练的权重，是否使用backbone的预训练权重
total_epoch = 300                                   #训练总的epoch
start_epoch = 0                                     #默认开始epoch
lr = 0.001                                         #初始学习率
freeze = True                                       #是否冻结,训练分为两个阶段，分别是冻结阶段和解冻阶段。
label_smoothing = 0
mosaic = False
lr_descend_method = "Adaptive"      #学习率下降方法

train_annotation_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/BDD10K/labels/train.txt"   #训练集
val_annotation_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/BDD10K/labels/val.txt"   #验证集
classes_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/private个人数据集/BDD10K/labels/bdd10k_class.txt" #类别路径
train_infor="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/python项目/目标识别/mobilenet-yolov4-pytorch(副本)/logs/infor.txt"    #训练信息txt路径
checkpoint_path="/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/权重/PR-YOLOV4/BDD10K/B0Adavpteve"                   #模型权重保存路径
ckpt_resume_path = '/media/jiji/3b75ab20-92d3-4be6-81c2-4e1798e2fe16/权重/PR-YOLOV4/BDD10K/B0Adavpteve/Epoch161_lr3.76e-06_traLoss736.23_valLoss1784.54.pth'           #模型恢复路径
